<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="friend_delete1" scope="session" class="software.Fri_done"/>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'friend_delete.jsp' starting page</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <%
    if(session.getAttribute("ID")==null){
    out.print("<script>alert('你还未登陆！请登录');</script>");
  %>
  <script type="text/javascript">
        window.location.href="index.jsp";    
   </script>
	 <%
    }
    	else{
    		String Id=session.getAttribute("ID").toString();
 		 	int Id1=Integer.parseInt(Id); 
 		 	int Id2 = Integer.parseInt(request.getParameter("friendid"));
    	 	friend_delete1.Fri_delete(Id1,Id2);
    	 	response.sendRedirect("selhome_friends.jsp");		
    	}	
     %>
  <body>
    <span id = sel></span><a href=javascript:countDown></a>
     <script>
     function countDown(secs){
     sel.innerText=secs;
     if(--secs>0)
     setTimeout("countDown("+secs+")",1000);
     }
     countDown(0);
     </script>
     
  </body>
</html>
